package commands;

import IA.InformationAggregator;

/**
 *
 * @author Christopher
 */
public class CmdRemoveItemComment extends Command{
    private String commentStr;
    
    public CmdRemoveItemComment(InformationAggregator ia, String commentStr){
        super(ia);
        this.commentStr = commentStr;
    }
    
    public Object execute(){
        String delimiter = "/";
        String[] ary;
        Integer itemIndex, commentIndex;
        
        ary = commentStr.split(delimiter);
        itemIndex = Integer.parseInt(ary[0]);
        commentIndex = Integer.parseInt(ary[1]);
        ia.getMenu().removeComment(itemIndex, commentIndex);
        return null;
    }
}
